package com.stlm2.dems.entity.base;

import com.stlm2.dems.entity.ShopLevel;
import com.stlm2.dems.entity.ShopType;

import java.util.Date;

/**
 * Created by zlq on 2017/10/16.
 */
public class BaseDdmShop {
    //
    private int id;
    //店铺名称
    private String name;
    //状态
    private Boolean state;
    //店铺主图
    private String mainImg;
    //店铺详情图
    private String datailImg;
    //店铺地址
    private String  location;
    //联系方式
    private String contact;
    //联系人
    private String linkman;
    //创建人
    private int createUserId;
    //创建时间
    private Date createTime;
    //修改人
    private Integer updateUserId;
    //修改时间
    private Date updateTime;
    //经纬度
    private String longitudeAndLatitude;
    private ShopType shopType;
    //店铺等级
    private ShopLevel shopLevel;

    public ShopLevel getShopLevel() {
        return shopLevel;
    }

    public void setShopLevel(ShopLevel shopLevel) {
        this.shopLevel = shopLevel;
    }

    public Boolean getState() {
        return state;
    }

    public void setState(Boolean state) {
        this.state = state;
    }

    public ShopType getShopType() {
        return shopType;
    }

    public void setShopType(ShopType shopType) {
        this.shopType = shopType;
    }

    public String getLongitudeAndLatitude() {
        return longitudeAndLatitude;
    }

    public void setLongitudeAndLatitude(String longitudeAndLatitude) {
        this.longitudeAndLatitude = longitudeAndLatitude;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getMainImg() {
        return mainImg;
    }

    public void setMainImg(String mainImg) {
        this.mainImg = mainImg;
    }

    public String getDatailImg() {
        return datailImg;
    }

    public void setDatailImg(String datailImg) {
        this.datailImg = datailImg;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getLinkman() {
        return linkman;
    }

    public void setLinkman(String linkman) {
        this.linkman = linkman;
    }

    public int getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(int createUserId) {
        this.createUserId = createUserId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


    public Integer getShopTypeValue(){
        return (shopType != null) ? shopType.getIntValue() : null;
    }

    public void setShopTypeValue(Integer v){
        if(v != null)
            shopType = ShopType.getByIntValue(v);
    }

    public Integer getShopLevelValue(){
        return (shopLevel != null) ? shopLevel.getIntValue() : null;
    }

    public void setShopLevelValue(Integer v){
        if(v != null)
            shopLevel = ShopLevel.getByIntValue(v);
    }

}
